<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
<%@include file="/WEB-INF/taglibs/common/taglibs.jsp"%>
<head>
<title>${answer.questionSubject}</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<link rel="stylesheet" href="<c:url value="/css/styles.css"/>" />
<script src="<c:url value="/javascripts/common.js"/>"></script>

</head>

<body><%@include file="../top_menu.jsp"%>
<table width="100%">
	<tr>
		<td><c:import url="/WEB-INF/jsp/serviceprovider/faq/faq_menu.jsp" />
		</td>
	</tr>
</table>

<table width="70%" align="center">
	<tr>
		<td align="left">
			<h2>${answer.questionSubject}</h2>
		</td>		
	</tr>
	<tr><td><spring:message code="sp.faq.viewanswer.label.published" /> ${answer.created} &nbsp;&nbsp;|&nbsp;&nbsp;<spring:message code="sp.faq.viewanswer.label.updated" /> ${answer.updated} </td></tr>
	<tr><td>&nbsp;</td></tr>
	<tr>
		<td align="left">${answer.questionSubject}
		<hr/>
		</td>		
	</tr>	
	<tr><td>&nbsp;</td></tr>
	<tr><td>${answer.answer}</td></tr>
	<tr><td>&nbsp;</td></tr>	
	<tr><td>&nbsp;</td></tr>
	
	<tr>
		<td>
			<b><spring:message code="sp.faq.viewanswer.label.wasthisanswerhelpful" />?</b><br/>
			<hr/>
			<a href="rate_answer.htm?id=${answer.id}&rate=1">
				<c:if test="${answer.rateValue ge 1.0}">
					<img src="<c:url value="/images/rate_star_1.gif"/>" border="0" width="24" height="24" title="Rate 1 star" />
				</c:if>
				<c:if test="${(answer.rateValue lt 1.0) and (answer.rateValue gt 0)}">
					<img src="<c:url value="/images/rate_star_2.gif"/>" border="0" width="24" height="24" title="Rate 1 star" />
				</c:if>
				<c:if test="${answer.rateValue eq 0}">
					<img src="<c:url value="/images/rate_star_3.gif"/>" border="0" width="24" height="24" title="Rate 1 star" />
				</c:if>			
			</a>
			
			<a href="rate_answer.htm?id=${answer.id}&rate=2">
				<c:if test="${answer.rateValue ge 2.0}">
					<img src="<c:url value="/images/rate_star_1.gif"/>" border="0" width="24" height="24" title="Rate 2 star" />
				</c:if>
				<c:if test="${(answer.rateValue lt 2.0) and (answer.rateValue gt 1.0)}">
					<img src="<c:url value="/images/rate_star_2.gif"/>" border="0" width="24" height="24" title="Rate 2 star" />
				</c:if>
				<c:if test="${answer.rateValue lt 2.0}">
					<img src="<c:url value="/images/rate_star_3.gif"/>" border="0" width="24" height="24" title="Rate 2 star" />
				</c:if>
			</a>
			<a href="rate_answer.htm?id=${answer.id}&rate=3">
				<c:if test="${answer.rateValue ge 3.0}">
					<img src="<c:url value="/images/rate_star_1.gif"/>" border="0" width="24" height="24" title="Rate 2 star" />
				</c:if>
				<c:if test="${(answer.rateValue lt 3.0) and (answer.rateValue gt 2.0)}">
					<img src="<c:url value="/images/rate_star_2.gif"/>" border="0" width="24" height="24" title="Rate 2 star" />
				</c:if>
				<c:if test="${answer.rateValue lt 3.0}">
					<img src="<c:url value="/images/rate_star_3.gif"/>" border="0" width="24" height="24" title="Rate 2 star" />
				</c:if>			
			</a>
			<a href="rate_answer.htm?id=${answer.id}&rate=4">
				<c:if test="${answer.rateValue ge 4.0}">
					<img src="<c:url value="/images/rate_star_1.gif"/>" border="0" width="24" height="24" title="Rate 2 star" />
				</c:if>
				<c:if test="${(answer.rateValue lt 4.0) and (answer.rateValue gt 3.0)}">
					<img src="<c:url value="/images/rate_star_2.gif"/>" border="0" width="24" height="24" title="Rate 2 star" />
				</c:if>
				<c:if test="${answer.rateValue lt 4.0}">
					<img src="<c:url value="/images/rate_star_3.gif"/>" border="0" width="24" height="24" title="Rate 2 star" />
				</c:if>
			</a>
			<a href="rate_answer.htm?id=${answer.id}&rate=5">
				<c:if test="${answer.rateValue ge 4.9}">
					<img src="<c:url value="/images/rate_star_1.gif"/>" border="0" width="24" height="24" title="Rate 2 star" />
				</c:if>
				<c:if test="${(answer.rateValue lt 4.9) and (answer.rateValue gt 4.1)}">
					<img src="<c:url value="/images/rate_star_2.gif"/>" border="0" width="24" height="24" title="Rate 2 star" />
				</c:if>
				<c:if test="${answer.rateValue lt 4.1}">
					<img src="<c:url value="/images/rate_star_3.gif"/>" border="0" width="24" height="24" title="Rate 2 star" />
				</c:if>
			</a>
		</td>
	</tr>				
	<tr><td>&nbsp;</td></tr>
	<tr><td>&nbsp;</td></tr>
	<tr>
		<td>
			<b><spring:message code="sp.faq.viewanswer.label.answerothersfoundhelpful" />?</b><br/>
			<ul>
				<c:forEach var="answer" items="${usefulAnswers}" varStatus="i">		
						<li>&nbsp;&nbsp;&nbsp;&nbsp;<a href="view_answer.htm?id=${answer.id}">${answer.questionSubject}</a><br/>
						</li><br/>						
						<br/>		
				</c:forEach>
			</ul>			
			<hr/>
		</td>
	</tr>	
</table>

<%@include file="/WEB-INF/jsp/include/footer.jsp"%>
</body>
</html>